<template>
  <div class="page-header">
    <div class="page-header-index-wide">
      <s-breadcrumb :backNavigation="backNavigation" />
      <div v-if="$route.meta.hidden && $route.meta.back && !backNavigation">
        <a-button type="primary" @click="$router.back()"> <a-icon type="left" />{{ $t('common.back') }} </a-button>
      </div>
    </div>
  </div>
</template>

<script>
import Breadcrumb from '@/components/tools/Breadcrumb';

export default {
  name: 'PageHeader',
  components: {
    's-breadcrumb': Breadcrumb
  },
  props: {
    title: {
      type: [String, Boolean],
      default: true,
      required: false
    },
    logo: {
      type: String,
      default: '',
      required: false
    },
    avatar: {
      type: String,
      default: '',
      required: false
    },
    backNavigation: {
      type: Object,
      default: null,
      required: false
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="less" scoped>
.page-header {
  background: #fff;
  padding: 16px 24px 6px;
}
</style>
